{% extends 'base.html' %}
{% block title %}首页{% endblock %}
{% block content %}

    <div class="row">

        {% include 'right.html' %}

        <div class="col-md-9">
            <div class="article">
                <div class="article-guid">
                    <a>最新</a>
                    <a>最新</a>
                    <hr style="margin-top:5px">
                </div>
                {% for post in post_list %}
                    <article class="post post-{{ post.pk }}">
                        <header class="entry-header">
                            <h1 class="entry-title">
                                <a href="{% url 'blog:detail' post.pk %}">{{ post.title }}</a>
                            </h1>

                        </header>
                        <div class="entry-content clearfix">
                            <p>{{ post.excerpt }}</p>
                            {#                        <div class="read-more cl-effect-14">#}
                            {#                            <a href="#" class="more-link">继续阅读 <span class="meta-nav">→</span></a>#}
                            {#                        </div>#}
                        </div>
                        <div class="entry-meta">
                            <span class="post-category"><a href="#">{{ post.category.name }}</a></span>
                            <span class="post-date"><a href="#"><time class="entry-date"
                                                                      datetime="{{ post.created_time }}">{{ post.created_time }}</time></a></span>
                            <span class="post-author"><a href="#">{{ post.author }}</a></span>
                            <span class="comments-link"><a href="#">4 评论</a></span>
                            <span class="views-count"><a href="#">588 阅读</a></span>
                        </div>
                    </article>
                    <hr style="margin: 0">
                {% empty %}
                    <div class="no-post">暂时还没有发布的文章！</div>
                {% endfor %}
            </div>
            <div class="pagination">
                <ul>
                    <li><a href="">1</a></li>
                    <li><a href="">...</a></li>
                    <li><a href="">4</a></li>
                    <li><a href="">5</a></li>
                    <li class="current"><a href="">6</a></li>
                    <li><a href="">7</a></li>
                    <li><a href="">8</a></li>
                    <li><a href="">...</a></li>
                    <li><a href="">11</a></li>
                </ul>
            </div>
        </div>
    </div>
{% endblock %}
